OPC-UA Embedded Server SDK
2.1.0
Main Page
Modules
Data Structures
Files
File List
Globals
ua_types.h
Go to the documentation of this file.
1
23
/*****************************************************************************/
29
/*****************************************************************************/
30
/* Copyright (c) 2009 - 2013 MatrikonOPC.
31
*
32
* ALL RIGHTS RESERVED.
33
*
34
* The information contained herein is the confidential and proprietary product
35
* of MatrikonOPC. Any unauthorized use, reproduction or
36
* transfer of this information is strictly prohibited.
37
*/
38
39
#ifndef _UA_TYPES_
40
#define _UA_TYPES_
41
42
#ifdef _WIN32
43
#include "stdint.h"
44
#else
45
#include <stdint.h>
46
#endif
47
48
#include <stddef.h>
49
50
#ifdef __cplusplus
51
extern
"C"
{
52
#endif
53
54
#include "ua_server_config.h"
55
#include "
opcua_status_codes.h
"
56
57
/*****************************************************************************/
61
#define bool_t int
62
#define TRUE 1
63
#define FALSE 0
68
/*****************************************************************************/
69
72
typedef
enum
73
{
74
UA_TYPE_Invalid
= 0,
75
UA_TYPE_Boolean
= 1,
76
UA_TYPE_SByte
= 2,
77
UA_TYPE_Byte
= 3,
78
UA_TYPE_Int16
= 4,
79
UA_TYPE_UInt16
= 5,
80
UA_TYPE_Int32
= 6,
81
UA_TYPE_UInt32
= 7,
82
UA_TYPE_Int64
= 8,
83
UA_TYPE_UInt64
= 9,
84
UA_TYPE_Float
= 10,
85
UA_TYPE_Double
= 11,
86
UA_TYPE_String
= 12,
87
UA_TYPE_DateTime
= 13,
88
UA_TYPE_Guid
= 14,
89
UA_TYPE_ByteString
= 15,
90
UA_TYPE_XmlElement
= 16,
91
UA_TYPE_NodeId
= 17,
92
UA_TYPE_ExpandedNodeId
= 18,
93
UA_TYPE_StatusCode
= 19,
94
UA_TYPE_QualifiedName
= 20,
95
UA_TYPE_LocalizedText
= 21,
96
UA_TYPE_ExtensionObject
= 22,
97
UA_TYPE_DataValue
= 23,
98
UA_TYPE_Variant
= 24,
99
UA_TYPE_Range
= 884,
100
UA_TYPE_EUInformation
= 887
101
}
UA_Value_type_t
;
102
103
/*****************************************************************************/
111
typedef
enum
112
{
113
opcua_server_state_running = 0,
114
opcua_server_state_failed = 1,
115
opcua_server_state_no_configuration = 2,
116
opcua_server_state_suspended = 3,
117
opcua_server_state_shutdown = 4,
118
opcua_server_state_test = 5,
119
opcua_server_state_communication_fault = 6,
120
opcua_server_state_unknown = 7,
121
end
122
}
UA_Server_state_t
;
123
124
/*****************************************************************************/
130
typedef
enum
131
{
132
UA_LOG_SEVERITY_ERROR
= 0,
133
UA_LOG_SEVERITY_INFO
= 1
134
}
UA_Log_severity_t
;
135
136
/*****************************************************************************/
143
typedef
enum
144
{
145
UA_LOG_PAYLOAD_NONE
= 0,
146
UA_LOG_PAYLOAD_CSTRING
= 1,
147
UA_LOG_PAYLOAD_BINARY
= 2
148
}
UA_Log_payload_t
;
149
150
/*****************************************************************************/
156
typedef
enum
157
{
158
UA_MON_ITEM_CREATED
= 0,
159
UA_MON_ITEM_MODIFIED
= 1,
160
UA_MON_ITEM_DESTROYED
= 2
161
}
UA_Mon_Item_Callback_Operation_t
;
162
163
/*****************************************************************************/
168
typedef
uint32_t
UA_Status_t
;
169
170
/*****************************************************************************/
178
typedef
struct
179
{
180
int16_t
length
;
181
const
uint8_t*
data
;
182
}
UA_UTF8_string_t
;
183
184
/*****************************************************************************/
192
typedef
struct
193
{
194
int32_t
length
;
195
int32_t
max_length
;
196
uint8_t*
data
;
197
}
UA_Byte_string_t
;
198
199
/*****************************************************************************/
203
typedef
UA_Byte_string_t
UA_Xml_element_t
;
204
205
/*****************************************************************************/
209
typedef
UA_Byte_string_t
UA_Var_string_t
;
210
211
/*****************************************************************************/
222
typedef
uint8_t*
UA_GUID_t
;
223
224
/*****************************************************************************/
230
typedef
union
231
{
232
bool_t
*
value_Boolean
;
233
int8_t*
value_SByte
;
234
uint8_t*
value_Byte
;
235
int16_t*
value_Int16
;
236
uint16_t*
value_UInt16
;
237
int32_t*
value_Int32
;
238
uint32_t*
value_UInt32
;
239
int64_t*
value_Int64
;
240
uint64_t*
value_UInt64
;
241
float
*
value_Float
;
242
double
*
value_Double
;
243
UA_Var_string_t*
value_String
;
244
int64_t*
value_DateTime
;
245
uint8_t*
value_GUID
;
246
UA_Byte_string_t
*
value_ByteString
;
247
UA_Xml_element_t*
value_XmlElement
;
248
void
*
value_Any
;
249
}
UA_Value_t
;
250
251
/*****************************************************************************/
255
typedef
struct
256
{
258
const
char
*
PRODUCT_URI
;
260
const
char
*
PRODUCT_NAME
;
262
const
char
*
MANUFACTURER_NAME
;
264
const
char
*
SOFTWARE_VERSION
;
266
const
char
*
BUILD_NUMBER
;
268
uint64_t
BUILD_DATE
;
269
}
UA_Configuration_BuildInfo_t
;
270
271
/*****************************************************************************/
275
typedef
struct
276
{
278
uint32_t
HELLO_TIMEOUT_IN_MS
;
280
uint32_t
CONNECTION_TIMEOUT_IN_MS
;
282
uint32_t
PORT_NUMBER
;
284
uint32_t
MAX_MESSAGE_SIZE
;
286
uint32_t
MAX_MESSAGE_CHUNK_SIZE
;
288
uint32_t
MAX_MESSAGE_CHUNK_COUNT
;
290
uint32_t
MAX_CONNECTIONS
;
291
}
UA_Configuration_TcpBinary_t
;
292
293
/*****************************************************************************/
298
typedef
struct
299
{
301
uint32_t
MIN_REVISED_CHANNEL_LIFETIME_IN_MS
;
303
uint32_t
MAX_REVISED_CHANNEL_LIFETIME_IN_MS
;
305
uint32_t
MAX_SECURE_CHANNELS
;
306
}
UA_Configuration_SecureConversation_t
;
307
308
/*****************************************************************************/
347
typedef
struct
348
{
350
uint64_t
ENDPOINT_SECURITY_POLICY_NONE
;
352
uint64_t
ENDPOINT_SECURITY_POLICY_SIGN_Basic128Rsa15
;
354
uint64_t
ENDPOINT_SECURITY_POLICY_SIGN_AND_ENCRYPT_Basic128Rsa15
;
356
uint64_t
ENDPOINT_SECURITY_POLICY_SIGN_Basic256
;
358
uint64_t
ENDPOINT_SECURITY_POLICY_SIGN_AND_ENCRYPT_Basic256
;
360
uint64_t
ENDPOINT_SECURITY_POLICY_SIGN_Basic256Sha256
;
362
uint64_t
ENDPOINT_SECURITY_POLICY_SIGN_AND_ENCRYPT_Basic256Sha256
;
363
}
UA_Configuration_Security_t
;
364
365
/*****************************************************************************/
371
#define UA_USER_TOKEN_POLICY_ANONYMOUS_TOKEN_SECURITY_POLICY_NONE (1<<0)
372
374
#define UA_USER_TOKEN_POLICY_USERNAME_PASSWORD_TOKEN_SECURITY_POLICY_NONE (1<<1)
375
376
#define UA_USER_TOKEN_POLICY_USERNAME_PASSWORD_TOKEN_SECURITY_POLICY_Basic128Rsa15 (1<<2)
377
378
#define UA_USER_TOKEN_POLICY_USERNAME_PASSWORD_TOKEN_SECURITY_POLICY_Basic256 (1<<3)
379
380
#define UA_USER_TOKEN_POLICY_USERNAME_PASSWORD_TOKEN_SECURITY_POLICY_Basic256Sha256 (1<<4)
381
383
#define UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_NONE (1<<5)
384
385
#define UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_Basic128Rsa15 (1<<6)
386
387
#define UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_Basic256 (1<<7)
388
389
#define UA_USER_TOKEN_POLICY_X509v3_CERTIFICATE_TOKEN_SECURITY_POLICY_Basic256Sha256 (1<<8)
390
391
/*****************************************************************************/
398
typedef
struct
399
{
401
uint32_t
INTERVALS_ARRAY_LENGTH
;
403
uint64_t*
INTERVALS_ARRAY
;
405
bool_t
ALLOW_ARBITRARY_INTERVALS
;
407
uint64_t
MIN_INTERVAL_IN_MS
;
409
uint64_t
MAX_INTERVAL_IN_MS
;
411
uint32_t
CYCLIC_RATE_IN_MS
;
412
}
UA_Configuration_Intervals_t
;
413
414
/*****************************************************************************/
418
typedef
struct
419
{
421
uint32_t
MIN_REVISED_SESSION_TIMEOUT_IN_MS
;
423
uint32_t
MAX_REVISED_SESSION_TIMEOUT_IN_MS
;
425
uint32_t
MAX_SESSIONS
;
427
uint32_t
MAX_SUBSCRIPTIONS_PER_SESSION
;
429
uint32_t
MIN_MAX_KEEP_ALIVE_COUNT
;
431
uint32_t
MAX_MAX_KEEP_ALIVE_COUNT
;
433
uint32_t
MAX_NOTIFICATION_RETRANSMISSION_QUEUE_SIZE
;
435
uint32_t
MAX_PUBLISH_REQUESTS_PER_SESSION
;
437
uint32_t
BROWSE_MAX_REFS_PER_NODE
;
439
uint32_t
MAX_MONITORED_ITEMS
;
441
uint32_t
MAX_MON_ITEM_QUEUE_SIZE
;
442
}
UA_Configuration_Services_t
;
443
444
/*****************************************************************************/
452
typedef
struct
453
{
455
uint32_t
NAMESPACE_ARRAY_LENGTH
;
457
const
char
**
NAMESPACE_ARRAY
;
458
}
UA_Configuration_NamespaceArray_t
;
459
460
/*****************************************************************************/
464
typedef
struct
465
{
467
UA_Configuration_NamespaceArray_t
NAMESPACES
;
468
}
UA_Configuration_AddressSpace_t
;
469
470
/*****************************************************************************/
475
typedef
struct
476
{
478
uint32_t
SOFTWARE_CERTIFICATES_LENGTH
;
480
UA_Byte_string_t
*
SOFTWARE_CERTIFICATES
;
481
}
UA_Configuration_CertManagement_t
;
482
483
/*****************************************************************************/
487
typedef
struct
488
{
490
uint32_t
LOCALE_ID_ARRAY_LENGTH
;
500
const
char
**
LOCALE_ID_ARRAY
;
501
}
UA_Configuration_Locales_t
;
502
503
/*****************************************************************************/
507
typedef
struct
508
{
510
uint32_t
SERVER_PROFILE_ARRAY_LENGTH
;
512
const
char
**
SERVER_PROFILE_ARRAY
;
513
}
UA_Configuration_ProfileArray_t
;
514
515
/*****************************************************************************/
519
typedef
struct
520
{
522
bool_t
ENFORCE_OPERATION_LIMITS
;
524
uint32_t
MAX_NODES_PER_READ
;
526
uint32_t
MAX_NODES_PER_HISTORY_READ_DATA
;
528
uint32_t
MAX_NODES_PER_HISTORY_READ_EVENTS
;
530
uint32_t
MAX_NODES_PER_WRITE
;
532
uint32_t
MAX_NODES_PER_HISTORY_UPDATE_DATA
;
534
uint32_t
MAX_NODES_PER_HISTORY_UPDATE_EVENTS
;
536
uint32_t
MAX_NODES_PER_METHOD_CALL
;
538
uint32_t
MAX_NODES_PER_BROWSE
;
540
uint32_t
MAX_NODES_PER_REGISTER_NODES
;
542
uint32_t
MAX_NODES_PER_TRANSLATE_BROWSE_PATHS_TO_NODE_IDS
;
544
uint32_t
MAX_NODES_PER_NODE_MANAGEMENT
;
546
uint32_t
MAX_MONITORED_ITEMS_PER_CALL
;
547
}
UA_Configuration_OperationLimits_t
;
548
549
/*****************************************************************************/
553
typedef
struct
554
{
556
uint32_t
MAX_BROWSE_CONTINUATION_POINTS
;
558
uint32_t
MAX_QUERY_CONTINUATION_POINTS
;
560
uint32_t
MAX_HISTORY_CONTINUATION_POINTS
;
562
uint32_t
MAX_ARRAY_LENGTH
;
564
uint32_t
MAX_STRING_LENGTH
;
566
UA_Configuration_OperationLimits_t
OPERATION_LIMITS
;
567
}
UA_Configuration_ServerCapabilities_t
;
568
569
/*****************************************************************************/
573
typedef
struct
574
{
576
bool_t
USE_HEAP_RATHER_THAN_RAM_BUFFER
;
578
uint8_t*
BUFFER
;
580
uint32_t
BUFFER_LENGTH_IN_BYTES
;
582
uint32_t
MAX_ALLOCATION_SIZE_IN_BYTES
;
584
uint32_t
ADDRESS_SPACE_HASH_TABLE_NO_OF_BUCKETS
;
586
uint32_t
MAX_NO_OF_DEFERRED_RESPONSE_MESSAGES
;
588
uint32_t
MAX_NO_OF_DEFERRED_OPERATIONS_PER_RESPONSE_MESSAGE
;
589
}
UA_Configuration_Internals_t
;
590
591
/*****************************************************************************/
595
typedef
struct
596
{
598
bool_t
ENABLE_INFO_LOG
;
600
bool_t
ENABLE_ERROR_LOG
;
601
}
UA_Configuration_Diagnostics_t
;
602
603
/*****************************************************************************/
607
typedef
struct
608
{
610
bool_t
DISABLE_PCT_DEADBAND
;
612
bool_t
DISABLE_PCT_DEADBAND_VECTORS
;
614
bool_t
DISABLE_PCT_DEADBAND_FLOATING_POINT
;
616
bool_t
DISABLE_PCT_DEADBAND_DOUBLE
;
618
bool_t
DISABLE_PCT_DEADBAND_FLOATING_POINT_VECTORS
;
620
bool_t
DISABLE_PCT_DEADBAND_DOUBLE_VECTORS
;
621
}
UA_Configuration_Filters_t
;
622
623
/*****************************************************************************/
627
typedef
struct
628
{
630
UA_Configuration_TcpBinary_t
TCP_BINARY
;
632
UA_Configuration_SecureConversation_t
SECURE_CONVERSATION
;
634
UA_Configuration_Security_t
SECURITY
;
636
UA_Configuration_Services_t
SERVICES
;
638
UA_Configuration_AddressSpace_t
ADDRESS_SPACE
;
640
UA_Configuration_CertManagement_t
CERT_MANAGEMENT
;
642
UA_Configuration_ProfileArray_t
PROFILE_ARRAY
;
644
UA_Configuration_ServerCapabilities_t
SERVER_CAPABILITIES
;
646
UA_Configuration_Locales_t
LOCALES
;
648
UA_Configuration_Internals_t
INTERNALS
;
650
UA_Configuration_Diagnostics_t
DIAGNOSTICS
;
652
UA_Configuration_Filters_t
FILTERS
;
654
UA_Configuration_Intervals_t
INTERVALS
;
655
}
UA_Configuration_t
;
656
657
658
/*****************************************************************************/
662
typedef
enum
663
{
664
opcua_node_encoding_numeric
= 0x02,
665
opcua_node_encoding_string
= 0x03,
666
opcua_node_encoding_guid
= 0x04,
667
opcua_node_encoding_bytestring
= 0x05
668
}
UA_NodeId_Identifier_Type_t
;
669
670
/*****************************************************************************/
674
typedef
struct
675
{
682
UA_NodeId_Identifier_Type_t
identifier_type
;
688
UA_UTF8_string_t
string_identifier
;
694
UA_GUID_t
guid_identifier
;
700
uint32_t
numeric_identifier
;
701
}
UA_NodeId_Config_t
;
702
703
/*****************************************************************************/
707
typedef
struct
708
{
713
uint32_t
node_handle
;
718
uint32_t
display_name_handle
;
724
uint32_t
description_handle
;
730
uint16_t
user_visibility
;
736
uint16_t
namespace_index
;
744
UA_NodeId_Config_t
node_id
;
745
}
UA_Base_t
;
746
747
/*****************************************************************************/
751
typedef
UA_Base_t
UA_Folder_t
;
752
753
/*****************************************************************************/
757
typedef
UA_Folder_t
UA_View_t
;
758
759
/*****************************************************************************/
763
typedef
struct
764
{
768
UA_Base_t
base_config
;
772
bool_t
writable
;
778
uint16_t
user_writable
;
779
}
UA_File_t
;
780
781
/*****************************************************************************/
785
typedef
struct
786
{
790
UA_Base_t
base_config
;
794
bool_t
executable
;
798
bool_t
user_executable
;
799
}
UA_Method_t
;
800
801
/*****************************************************************************/
805
typedef
struct
806
{
810
UA_Base_t
base_config
;
814
UA_Value_type_t
value_type
;
818
uint32_t
max_array_length
;
822
uint16_t
user_read_permissions
;
826
uint16_t
user_write_permissions
;
827
}
UA_BaseDataVariable_t
;
828
829
/*****************************************************************************/
833
typedef
struct
834
{
838
UA_BaseDataVariable_t
data_variable_config
;
842
bool_t
use_definition
;
846
UA_UTF8_string_t
definition
;
850
bool_t
use_value_precision
;
854
float
value_precision
;
855
}
UA_DataItem_t
;
856
860
typedef
struct
861
{
865
float
low
;
869
float
high
;
870
}
UA_Range_t
;
871
875
typedef
struct
876
{
881
UA_UTF8_string_t
namespace_uri
;
885
int16_t
unit_id
;
891
uint32_t
display_name_handle
;
897
uint32_t
description_handle
;
898
}
UA_EUInformation_t
;
899
900
/*****************************************************************************/
904
typedef
struct
905
{
909
UA_DataItem_t
data_item_config
;
914
bool_t
use_instrument_range
;
918
UA_Range_t
instrument_range
;
922
UA_Range_t
EU_range
;
927
bool_t
use_engineering_units
;
931
UA_EUInformation_t
engineering_units
;
932
}
UA_AnalogItem_t
;
933
934
/*****************************************************************************/
938
typedef
struct
939
{
943
UA_DataItem_t
data_item_config
;
947
uint32_t
true_state_handle
;
951
uint32_t
false_state_handle
;
952
}
UA_TwoStateDiscrete_t
;
953
954
/*****************************************************************************/
958
typedef
struct
959
{
963
UA_DataItem_t
data_item_config
;
967
uint16_t
no_of_values
;
973
uint32_t
enum_handle
;
974
}
UA_MultiStateDiscrete_t
;
975
976
/*****************************************************************************/
980
typedef
enum
981
{
982
UA_ASYM_CIPHER_INVALID
= 0,
983
UA_ASYM_CIPHER_RSA_PKCS1_v1_5
= 1,
984
UA_ASYM_CIPHER_RSA_OAEP
= 2
985
}
UA_Asym_Cipher_t
;
986
987
/*****************************************************************************/
991
typedef
enum
992
{
993
UA_SYM_CIPHER_INVALID
= 0,
994
UA_SYM_CIPHER_AES_128_CBC
= 1,
995
UA_SYM_CIPHER_AES_256_CBC
= 2
996
}
UA_Sym_Cipher_t
;
997
998
/*****************************************************************************/
1002
typedef
enum
1003
{
1004
UA_DIGEST_INVALID
= 0,
1005
UA_DIGEST_SHA1
= 1,
1006
UA_DIGEST_SHA256
= 2
1007
}
UA_Digest_t
;
1008
1009
/*****************************************************************************/
1013
typedef
enum
1014
{
1015
SECURITY_POLICY_INVALID
,
1016
SECURITY_POLICY_NONE
,
1017
SECURITY_POLICY_BASIC128RSA15
,
1018
SECURITY_POLICY_BASIC256
,
1019
SECURITY_POLICY_BASIC256SHA256
1020
}
UA_Security_policy_t
;
1021
1022
/*****************************************************************************/
1026
typedef
enum
1027
{
1028
UA_CERT_TYPE_INVALID
= 0,
1029
UA_CERT_TYPE_CLIENT_APPLICATION
= 1,
1030
UA_CERT_TYPE_SERVER_APPLICATION
= 2,
1031
UA_CERT_TYPE_APPLICATION_CA
= 3,
1032
UA_CERT_TYPE_USER
= 4,
1033
UA_CERT_TYPE_USER_CA
= 5
1034
}
UA_Certificate_Type_t
;
1035
1036
/*****************************************************************************/
1043
#define OB_SUPPRESS_CERTIFICATE_EXPIRED (1<<0)
1044
1045
#define OB_SUPPRESS_HOSTNAME_INVALID (1<<1)
1046
1048
#define OB_SUPPRESS_REVOCATION_STATUS_UNKNOWN (1<<2)
1049
1050
#define OB_CHECK_REVOCATION_STATUS_ONLINE (1<<3)
1051
1052
#define OB_CHECK_REVOCATION_STATUS_OFFLINE (1<<4)
1053
1054
#define OB_USE_DEFAULT_OPTIONS (1<<5)
1055
1056
#define OB_TRUST_ALL_CLIENTS_WHEN_TRUST_LIST_IS_EMPTY (1U<<31)
1057
1058
#define OB_DO_NOT_SAVE_REJECTED_CERTIFICATES (1U<<30)
1059
1062
#ifdef __cplusplus
1063
}
1064
#endif
1065
1066
#endif
/*_UA_TYPES_*/
1067
source
ua_types.h
Generated on Mon Apr 13 2015 14:11:33 for OPC-UA Embedded Server SDK by
1.8.3.1